﻿#define Expection

using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.Design;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Xml;
using UmcProvider.Controls;
using UmcProvider;

namespace ChinaTelecom.SmartPhone.Controls
{
#if Expection   //if reserve mode
    public interface IImageButtonExpection : IUmc
    {
        string ImageDefault
        {
            get;
        }
        string ImagePressed
        {
            get;
        }
        string Name { get; }
        bool Enabled { get; }
        Size Size { get; }
        Point Location { get; }
        string Text { get; }
        Color BackColor { get; }
        Font Font { get; }
        Color ForeColor { get; }
    }
    public interface IImageButton : IImageButtonExtension,IImageButtonExpection{}
    [Designer(typeof(UmcDesigner<IImageButton>))]
#else                 //if exclude mode
    //Add the Properties to be excluded here
    [ExcludeProperty]
    public interface IImageButtonExculde : IUmc
    {
    }
    public interface IUmcImageButton : IImageButtonExtension,IImageButtonExculde{}
    [Designer(typeof(UmcDesigner<ImageButton>))]
#endif
    [ToolboxBitmap(typeof(System.Windows.Forms.PictureBox), "PictureBox.bmp")]
    [ToolboxItem(true)]
    [Serializable()]
    public class ImageButton : System.Windows.Forms.Control, IImageButton
    {
        [Category("Appearance")]
        [Description("Image when the button is not pressed.")]
        public string ImageDefault
        {
            get;
            set;
        }

        [Category("Appearance")]
        [Description("Image when the button is pressed.")]
        public string ImagePressed
        {
            get;
            set;
        }

        protected override void OnPaint(System.Windows.Forms.PaintEventArgs e)
        {
            base.OnPaint(e);
            e.Graphics.FillRectangle(
                new SolidBrush(ForeColor),
                ClientRectangle);
        }
    }

    //Add Extension Properties here , and Implement in Inheritance class
    public interface IImageButtonExtension
    {
    }


    //public interface IUmcImageButton : IControl
    //{
    //    string ImageDefault
    //    {
    //        get;
    //    }

    //    string ImagePressed
    //    {
    //        get;
    //    }
    //}

    public sealed class UmcImageButton : DefaultConverter<UmcImageButton, ImageButton>, IImageButton
    {
        public string ImageDefault
        {
            get { throw new NotImplementedException(); }
        }

        public string ImagePressed
        {
            get { throw new NotImplementedException(); }
        }

        public bool Enabled
        {
            get { throw new NotImplementedException(); }
        }

        public bool Visible
        {
            get { throw new NotImplementedException(); }
        }

        public System.Drawing.Size Size
        {
            get { throw new NotImplementedException(); }
        }

        public System.Drawing.Point Location
        {
            get { throw new NotImplementedException(); }
        }

        public string Text
        {
            get { throw new NotImplementedException(); }
        }

        public System.Drawing.Color BackColor
        {
            get { throw new NotImplementedException(); }
        }

        public System.Drawing.Font Font
        {
            get { throw new NotImplementedException(); }
        }

        public System.Drawing.Color ForeColor
        {
            get { throw new NotImplementedException(); }
        }

        public string Name
        {
            get { throw new NotImplementedException(); }
        }
    }

}
